package com.ganbo.stock.task;

import com.ganbo.stock.service.impl.FundServiceImpl;
import com.ganbo.stock.service.impl.FundStockLastServiceImpl;
import com.ganbo.stock.service.impl.FundStockServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 拉取优质基金，优质基金持仓股票，生成当日股票池数据，完善当日股票池数据的盘口信息，同步当日股票池数据到历史股票池数据
 *
 * @Author: ganbo
 * @Date: 2019/12/2 19:31
 */
@Component
@Slf4j
public class FundStockLastTodayRealTask {

    @Autowired
    FundStockLastServiceImpl fundStockLastServiceImpl;
    @Autowired
    FundServiceImpl fundServiceImpl;
    @Autowired
    FundStockServiceImpl fundStockServiceImpl;

//    @Scheduled(cron = "0/5 * * * * ?")  //每5秒执行一次
//    public void groupMessageFailRetryTask() {
//        log.info("==================更新开始======");
//        fundService.init(); //拉取优质基金信息
//        fundStockService.fetchFundStockTask(); //拉取优质基金的持仓股票信息
//        fundStockLastService.initFundStockLast(); //生成基金持仓最多的股票
//        fundStockLastService.updateFundStockLastTodayReal(); //更新股票当日盘口信息
//        log.info("==================更新完毕======");
//    }


}
